﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RPGKata
{
    class Armor
    {
        public string name { get; set; }
        public int encumbrance { get; set; }
        public int protection { get; set; }

        public Armor()
        {

        }

        public Armor(string n, int p, int e)
        {
            name = n;
            protection = p;
            encumbrance = e;
        }

        public void setProtection(string num)
        {
            while (!Roll.isValidInt(num))
            {
                Console.WriteLine("That's not a number between 0 and 20! Please choose again.");
                num = Console.ReadLine();
            }
            int number = int.Parse(num);
            protection = number;
        }

        public void setEncumbrance(string num)
        {
            while (!Roll.isValidInt(num))
            {
                Console.WriteLine("That's not a number between 0 and 20! Please choose again.");
                num = Console.ReadLine();
            }
            int number = int.Parse(num);
            encumbrance = number;
        }
    }
}
